`timescale 1ns / 1ps

module move_average_tb();

parameter               WIDTH = 32;
parameter               AVE_N = 4;
logic data_in_valid = 0;
logic [WIDTH-1:00] data_in = 0;
logic data_out_valid;
logic [WIDTH-1:00] data_out;

reg                     clk = 0;
always
    #(1s/100_000_000/2) clk = ~clk;

reg                     rst_n = 1;
initial
begin
    #1us; rst_n = 0;
    #1us; rst_n = 1;
end

initial
begin
    #10us;
    for(int i = 0; i < 100000; i = i + 1 )
    begin
        @ (posedge clk);
        data_in_valid = 1;
        data_in = 32'h10000000 + i+1;
        @ (posedge clk);
        data_in_valid = 0;
        #100ns;
    end
end

move_average #
(
    .WIDTH           (  32               ),
    .AVE_N           (  4              )
)
move_averageEx01
(
    .clk             (  clk                 ),
    .rst_n           (  rst_n               ),
    .data_in_valid   (  data_in_valid       ),
    .data_in         (  data_in             ),
    .data_out_valid  (                      ),
    .data_out        (                      )
);

endmodule

